export interface User {
  id: number;
  username: string;
  email: string;
}

export interface Reply {
  id: number;
  user: User;
  content: string;
  created_at: string;
}

export interface Comment {
  id: number;
  user: User;
  content: string;
  created_at: string;
  updated_at: string;
  replies: Reply[];
}

export interface ConfigJson {
  id: number;
  name: string;
  content: any;
}

export interface InstallCommand {
  id: number;
  name: string;
  command: string;
}

export interface Tag {
  name: string;
  color?: string;
}

export interface Server {
  id: string;
  name: string;
  name_cn: string;
  icon: string;
  provider: string;
  description: string;
  description_cn: string;
  category: string[];
  category_cn: string[];
  tags: string[];
  is_official: boolean;
  is_internal: boolean;
  from_site: string;
  from_site_url: string;
  sse_url: string;
  http_url: string;
  access_mode: 'LOCAL' | 'SSE' | 'HTTP';
  zone?: 'YELLOW' | 'GREEN' | 'COMMON' | null;
  is_deleted: boolean;
  created_at: string;
  updated_at: string;
}

export interface ServerDetail extends Server {
  auth_method: string;
  language: string[];
  server_config: string;
  env_schema: Record<string, any>;
  tools: any[];
  readme: string;
  readme_cn: string;
  verified: boolean;
  comments: Comment[];
}

export interface ServerListParams {
  page?: number;
  page_size?: number;
  pageSize?: number;
  search?: string;
  category?: string;
  tags?: string[];
  is_internal?: boolean;
  is_official?: boolean;
  provider?: string;
  access_mode?: string[];
  ordering?: string;
}

export interface ServerListResponse {
  count: number;
  next: string | null;
  previous: string | null;
  results: Server[];
}

export interface ReadmeResponse {
  content: string;
} 